package de.jmda.gen.java.impl;

import de.jmda.gen.Generator;
import de.jmda.gen.GeneratorException;
import de.jmda.gen.impl.DefaultGenerator;
import de.jmda.gen.java.DeclaredElementGenerator;

/**
 * Wrapper for {@link Generator}s such as {@link DefaultGenerator}, so that
 * they can indirectly be used as {@link DeclaredElementGenerator}.
 *
 * @author roger.jmda@gmail.com
 */
public class DefaultDeclaredElementGenerator
    extends DefaultGenerator
    implements DeclaredElementGenerator
{
	private Generator generator;

	public DefaultDeclaredElementGenerator(Generator generator)
  {
	  super();
	  this.generator = generator;
  }

	@Override
  public StringBuffer generate() throws GeneratorException
  {
	  return generator.generate();
  }
}